package com.bootcamp.javase.oop.extend;

/**
 * @program: ExtendsCode
 * @description:
 * @author: Keyu Li
 * @create: 2021-08-31 19:27
 **/

public class Student {
    static int count = 0;
    {
        if (count==10){
            System.out.println("已经创建满10个对象！");
            System.exit(0);
        }
    }
    public Student(){
        System.out.println("创建了一个 Student 对象！");
        Student.count++;
    }
}
